from __future__ import print_function, division
%matplotlib inline
import thinkdsp
import thinkplot
import warnings
warnings.filterwarnings('ignore')
from IPython.html.widgets import interact, fixed
from IPython.display import display
import matplotlib.pyplot as plt
#import librosa
#wave, sr = librosa.load('170255__dublie__trumpet.wav')
wave = thinkdsp.read_wave('170255__dublie__trumpet.wav')
wave.normalize()
wave.make_audio()
wave2=wave
wave3=wave
wave.plot()
def stretch(wave, factor):
wave.ts *= factor
wave.framerate /= factor
stretch(wave, 0.5)
wave.make_audio()
wave.plot()
stretch(wave2, 1.5)
wave2.make_audio()
wave2.plot()
stretch(wave3, 3.5)
wave3.make_audio()
wave3.plot()